{{ define "title" }}
Components - Sources, Transforms, and Sinks | {{ site.Title }}
{{ end }}

{{ define "main" }}
{{ $criteria := .Params.criteria }}
{{ $types := slice "Sources" "Transforms" "Sinks" }}
<div class="relative max-w-3xl mx-auto px-6 lg:px-8 lg:max-w-7xl mt-8 pb-24">
  <div class="my-16">
    {{ partial "hero.html" . }}
  </div>

  <div class="flex flex-col space-y-12">
    {{ range $types }}
    {{ $components := where site.RegularPages ".CurrentSection.Params.short" . }}
    {{ $num := len $components }}
    {{ $link := printf "docs/reference/configuration/%s" (. | lower) | relURL }}
    <div>
      <p class="flex items-end justify-between space-x-2 text-2xl md:text-3xl lg:text-4xl mb-4 dark:text-gray-200">
        <a href="{{ $link }}" class="font-bold hover:text-secondary dark:hover:text-primary">
          {{ . }}
        </a>

        <span class="flex items-center space-x-2 text-sm text-gray-500 dark:text-gray-300">
          <span>
            count
          </span>
          <span class="font-bold">
            {{ $num }}
          </span>
        </span>
      </p>

      <div class="grid grid-cols-1 gap-x-2 gap-y-2.5 sm:grid-cols-2 lg:grid-cols-4">
        {{ range $components }}
        {{ .Render "component-card" }}
        {{ end }}
      </div>
    </div>
    {{ end }}
  </div>
</div>
{{ end }}